package com.qyl.deguru.controller.admin;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;



import com.qyl.deguru.dto.OrderItem;
import com.qyl.deguru.service.OrderItemService;
import com.qyl.deguru.service.impl.OrderItemServiceImpl;

@Controller
@RequestMapping("/admin/orderItem")
public class OrderItemController {
	@RequestMapping("/getOrderItemsByOrderId")
	public String getOrderItemsByOrderId(int oid,ModelMap map){
		System.out.println("=========");
		OrderItemService orderItemService = new OrderItemServiceImpl();
		List<OrderItem> orderItems = orderItemService.getOrderItemsByOid(oid);
		map.addAttribute("orderItems",orderItems);
		return "order/orderItemList";
	}
}
